home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue5 / PD / DIRSYNC / LegalStuff / ccres / c / _ColourMenu < prev    next >
Text File  |  2004-03-20  |  2KB  |  61 lines

  1. /* _ColourMenu.c
  2.    $Id: _ColourMenu.c,v 1.2 2004/03/20 22:13:37 joty Exp $
  3.  
  4.    Copyright (c) 2003-2004 Dave Appleby / John Tytgat
  5.  
  6.    This file is part of CCres.
  7.  
  8.    CCres is free software; you can redistribute it and/or modify
  9.    it under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License, or
  11.    (at your option) any later version.
  12.  
  13.    CCres is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.    GNU General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with CCres; if not, write to the Free Software
  20.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21.  */
  22.  
  23. #include "ccres.h"
  24.  
  25. #include <stdio.h>
  26. #include <string.h>
  27.  
  28. #include <OSLib/colourmenu.h>
  29.  
  30. static FLAGS ColourMenuFlags[] = {
  31.     {colourmenu_GENERATE_ABOUT_TO_BE_SHOWN , "colourmenu_GENERATE_ABOUT_TO_BE_SHOWN" },
  32.     {colourmenu_GENERATE_DIALOGUE_COMPLETED, "colourmenu_GENERATE_DIALOGUE_COMPLETED"},
  33.     {colourmenu_GENERATE_HAS_BEEN_HIDDEN   , "colourmenu_GENERATE_HAS_BEEN_HIDDEN"   },
  34.     {colourmenu_NONE_ENTRY                 , "colourmenu_NONE_ENTRY"                 }
  35. };
  36.  
  37. static FLAGS ColourMenuColours[] = {
  38.     {colourmenu_TRANSPARENT, "colourmenu_TRANSPARENT"},
  39.     {colourmenu_NONE       , "colourmenu_NONE"       }
  40. };
  41.  
  42. static OBJECTLIST ColourMenuObjectList[] = {
  43.     {iol_FLAGS, "colourmenu_flags:", offsetof(colourmenu_object, flags),  ColourMenuFlags,   ELEMENTS(ColourMenuFlags)               },
  44.     {iol_MSG,   "title:",            offsetof(colourmenu_object, title),  "title_limit:",    offsetof(colourmenu_object, title_limit)},
  45.     {iol_ENUM,  "colour:",           offsetof(colourmenu_object, colour), ColourMenuColours, ELEMENTS(ColourMenuColours)             }
  46. };
  47.  
  48.  
  49. int _colourmenu(PDATA data, PSTR pszIn, toolbox_relocatable_object_base * object)
  50. {
  51.     put_objects(data, pszIn, 0, (PSTR) (object + 1), ColourMenuObjectList, ELEMENTS(ColourMenuObjectList));
  52.  
  53.     return(sizeof(colourmenu_object));
  54. }
  55.  
  56.  
  57. void colourmenu(FILE * hf, toolbox_resource_file_object_base * object, PSTR pszStringTable, PSTR pszMessageTable)
  58. {
  59.     get_objects(hf, pszStringTable, pszMessageTable, (PSTR) (object + 1), ColourMenuObjectList, ELEMENTS(ColourMenuObjectList), 1);
  60. }
  61.